package T200;

/**
 * @Author cheng.song
 * @create 2022/1/26 16:42
 */
public class 第一个错误的版本278 {


    public int firstBadVersion(int n) {
        int left =1;
        int right=n;
        while (left<=right){
            int mid =left + (right-left)/2;
            if(isBadVersion(mid)){
                right = mid;
            }else{
                left = mid+1;
            }
        }
        return left;
    }

    public boolean isBadVersion(int n){

        return true;
    }
}
